Using the command line version

You can also control the defragmentation by means of the command line version of O&O Defrag. In this way, you can also integrate O&O Defrag into scripts that you run at startup or log-in.

When you start the program from the command line, the main interface window will not appear. A mini O&O Defrag icon will appear in the tasktray, and you can follow the progress of the actions in your DOS prompt.

O&O Defrag runs independently of the main user interface and the DOS prompt in the background. If you close the DOS prompt or cancel the command line tool with Ctrl+Break/Ctrl+C, you can choose whether to end the program or have it run on in the background. You can also cancel the processes later with the STOP command,

Tip: If you start O&O Defrag from the command line, you can also start the main user interface later. This will show you the status as usual, and you won’t be interrupting or stopping the running processes.

Starting O&O Defrag

The following list shows you the possible parameters for the command line version.

OODCMD {C:[,] | ... | Z:} | {/{<COMMAND>}{C[,] | ... | Z | ALL}} [/MAXUSAGE:AUTO|0..100|MAX] [/OUTPUTFILE:<File name>] [/SILENT] [/NOHEADER] [/NOWAIT] [/WAITKEY]

<COMMAND> must be one of the following volume commands:

ANALYSIS, COMPNAME, COMPACC, COMPMOD, FRAGFILES, SPACE, STEALTH

Parameter

 

Syntax

Description

/ANALYSIS:{C[,] | ... | Z | ALL}

Analyses the given volume. The result will be shown in one of the display possibilities (generally the DOS prompt), or written into the output file.

/COMPACC:{C[,] | ... | Z | ALL}

Starts the COMPLETE/Access defragmentation on all the given volumes, or on all volumes on the system (ALL).

/COMPMOD:{C[,] | ... | Z | ALL}

Starts the COMPLETE/Date defragmentation on all the given volumes, or on all volumes on the system (ALL).

/COMPNAME:{C[,] | ... | Z | ALL}

Starts the COMPLETE/Name defragmentation on all the given volumes or on all the volumes on the system (ALL).

/FRAGFILES:{C[,] | ... | Z | ALL}

Analyses the given volume and lists the fragmented files. The result will be shown in one of the display possibilities (generally the DOS prompt), or written into the output file.

/INFO:{C[,] | ... | Z | ALL}

Shows the volume information for all the given volumes, or for all volumes on the system (ALL).

/MAXUSAGE:AUTO|0..100|MAX

Activates the O&O ActivityGuard Pro and configures the resource usage. This value has priority over that given in the options dialog.

/NOHEADER

Stops the display of the program information when the program is started from the DOS prompt.

/NOWAIT

Starts the given operation and starts the command line program immediately. The operation runs in the background. This is useful if you want to start an operation with a multiple file, but don’t wish to wait until this process has finished.

/OUTPUTFILE:<File name>

All output values will be saved to a file with the given path and name.

/SILENT

There are no output values.

/SPACE:{C[,] | ... | Z | ALL}

Starts the SPACE defragmentation on all given volumes, or on all the volumes on the system (ALL).

/STEALTH:{C[,] | ... | Z | ALL}

Starts the STEALTH defragmentation on all given volumes, or on all the volumes on the system (ALL).

/STOP:{C[,] | ... | Z | ALL}

Stops all processes (analysis, defragmentation etc) on the given volumes, or on all volumes on the system (ALL).

/WAITKEY

Waits for a keystroke before ending the command line program (once the operation has ended).